/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.namabank.helpdesk.model;

import com.namabank.db.GlobalHibernate;
import com.namabank.helpdesk.dbobj.*;
import org.apache.commons.lang.StringEscapeUtils;

/**
 *
 * @author Nguyen Tran Hien
 */
public class RoleModel {

    public static final String TICKET_ASSIGN = "TICKET_ASSIGN";
    public static final String TICKET_AUTH = "TICKET_AUTH";
    public static final String TICKET_INPUT = "TICKET_INPUT";
    public static final String TICKET_SELFGET = "TICKET_SELFGET";
    public static final String HELPDESK_INPUT = "HELPDESK_INPUT";



    public RoleModel(){}

    public static SMTB_ROLE getSMTB_DEPARTMENTById(String roleId){
        String qry = "from SMTB_ROLE where ROLE_ID = '" + StringEscapeUtils.escapeSql(roleId) + "'";
        return (SMTB_ROLE)GlobalHibernate.openSession().createQuery(qry).uniqueResult();
    }

}
